package com.kerwin.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
/*之前这里报红的原因是我没有把它放进容器*/
@ConfigurationProperties(prefix = "crm.token")
public class CrmTokenProperties {
    /*我需要的token name*/
    private String userPhone;
    /*配置文件里面 自动转换header-name*/
    private String headerName;
    private Long expTime;

    public CrmTokenProperties() {
    }

    public CrmTokenProperties(String userPhone, String headerName, Long expTime) {
        this.userPhone = userPhone;
        this.headerName = headerName;
        this.expTime = expTime;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getHeaderName() {
        return headerName;
    }

    public void setHeaderName(String headerName) {
        this.headerName = headerName;
    }

    public Long getExpTime() {
        return expTime;
    }

    public void setExpTime(Long expTime) {
        this.expTime = expTime;
    }
}
